<template>
  <div class="edit-status-info">
    <div class="content" :class="terminalInfo.type">
      <div v-for="(item, index) in terminalInfo.message" :key="index">{{item}}</div>
    </div>
    <div class="img-box" id="qr"></div>
  </div>
</template>
<script>
import { mapState } from 'vuex'
export default {
  computed: {
    ...mapState({
      terminalInfo: state => {
        return {
          ...state.terminalInfo,
          message: Array.isArray(state.terminalInfo.message) ? state.terminalInfo.message : [state.terminalInfo.message]
        }
      },
      bundleSrc: state => state.bundleSrc
    })
  }
}
</script>
<style lang="less" scoped>
  .edit-status-info {
    border-top: 1px solid #333;
    color: #FFF;
    overflow-x: auto;
    overflow-y: hidden;
    position: absolute;
    height: 100px;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    .img-box {
      width: 100px;
      height: 100px;
      img {
        width: 100%;
        height: 100%;
      }
    }
    .content {
      overflow-x: auto;
      flex: 1;
      line-height: 24px;
      padding: 10px 10px 10px 30px;
      font-size: 18px;
      letter-spacing: 2px;
      word-break: break-all;
    }
    .error {
      color: #F53E3E;
    }
    .success {
      color: #00FF7F;
    }
  }
</style>
